<?php 
if (!defined('INDEX')) exit;
###########################################################################################
// Table names (leave blank for table which not use)

$tbl["cat"] = "";
$tbl["content"] = "users";
$tbl["login_as_user"] = "login";
// Start class
require("core/class_start.inc.php");
###########################################################################################
switch (@$_GET['p'])
{
	// Generate form add content
	case "add_content":
		$mdl_form = array(
					
		);
	break;
	// Generate form edit content
	case "edit_content":
		$mdl_form = array(
			'First name' => $jcas->draw_input('text','first_name','400px',0,'',0),
            'Last name' => $jcas->draw_input('text','last_name','400px',0,'',0),
            'Email' => $jcas->draw_input('text','email','400px',0,'',0),
            'Phone' => $jcas->draw_input('text','mobile','400px',0,'',0),
		);
	break;
	// Generate view content
	case "view_content":
		$mdl_form = "";
	break;
}
###########################################################################################
// Records per page
$mdl_cfg["content_per_page"] = 20;

// Module description (displayed on the top page)
$mdl_cfg['module_description'] = 'Quản lý thành viên';

// Head title (leave blank for default)
$mdl_cfg['head_title'] = '';

// Fields that require user to type in (seperated by comma)
$mdl_cfg['required_fields'] = "";

// Search in fields (each field in array)
$mdl_cfg['search_fields'] = array(
	//'field name' => 'display text',
	'id' => 'ID',
    'first_name'=>'First Name',
    'last_name'=>'Last Name',
	'email' => 'Email',
    'mobile'=>'Phone'
);

// Sort by fields (Ascending)
$mdl_cfg['sort_fields'] = array(
	//'field name' => 'display text',
	'sort' => 'Mặc định',
	'created_time' => 'Created time',
);

// Display cat options
$mdl_cfg['cat_options'] = '';

// Display content options
$mdl_cfg['content_options'] = array(
	//'content_option&content_field&content_value' => 'display text',
	'content_option=default' => $lang['display_default'],
	'content_option=1&content_field=active&content_value=0' => $lang['display_inactive_items'],
	'content_option=2&content_field=active&content_value=1' => $lang['display_active_items']
);
$mdl_cfg['tbl_alias'] = 'users.';
$mdl_sql['show_content'] = 'SELECT SQL_CALC_FOUND_ROWS
                            users.id,
                            users.first_name,
                            users.last_name,
                            users.email,
                            users.`password`,
                            users.birthdate,
                            users.address,
                            users.city_id,
                            users.phone,
                            users.mobile,
                            users.key_reset,
                            users.active,
                            users.cat_id,
                            users.lang_id,
                            users.admin_id,
                            users.created_time,
                            users.created_by,
                            users.updated_time,
                            users.updated_by,
                            users.sort,
                            city.`name` AS city_name
                            FROM
                            users
                            INNER JOIN city ON city.id = users.city_id WHERE 1';
?>